package com.yunxin.core.application.dto.product;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author zero°
 * @since 2023-06-08
 */
@Data
@Schema(description = "产品信息响应对象")
public class ProductInfoDTO implements Serializable {


    /**
     * 产品名称
     */
    @Schema(description = "产品名称")
    private String productName;
    /**
     * 对接方式 1.自营 2.h5 3.api 4.企业微信
     */
    @Schema(description = "对接方式 1.自营 2.h5 3.api 4.企业微信")
    private Integer abutmentType;
    /**
     * 跳转url abutmentType=2/4时必填,为2时为跳转url，为4时为企业微信跳转url
     */
    @Schema(description = "跳转url abutmentType=2/4时必填,为2时为跳转url，为4时为企业微信跳转url")
    private String jumpUrl;

    /**
     * 产品logo
     */
    @Schema(description = "产品logo")
    private String productLogo;

    /**
     * 最高可借金额
     */
    @Schema(description = "最高可借金额")
    private BigDecimal highestBorrowableAmount;

    /**
     * 标签(,连接)
     */
    @Schema(hidden = true)
    private String productLabeling;

    /**
     * 标签
     */
    @Schema(description = "标签")
    private List<String> productLabelingList;
    /**
     * 产品solGan
     */
    @Schema(description = "产品solGan")
    private String productSolGan;

    /**
     * 产品权益描述(JSON实体-list)
     */
    @Schema(description = "产品权益描述(JSON实体-list)")
    private List<EquityDescription> equityDescription;

    /**
     * 商户名称
     */
    @Schema(description = "商户名称")
    private String merchantName;
    /**
     * 商户名称
     */
    @Schema(description = "商户id")
    private Long merchantId;


    /**
     * apiUrl
     */
    @Schema(description = "apiUrl")
    private String apiUrl;

    /**
     * 协议配置(JSON实体)
     */
    @Schema(description = "协议配置(实体)")
    private List<ProtocolConfig> protocolConfig;

    /**
     * 客服配置
     */
    @Schema(description = "客服配置")
    private CustomerServiceConfig customerServiceConfig;

    @Data
    public static class EquityDescription implements Serializable {
        /**
         * 权益描述图片
         */
        @Schema(description = "权益描述图片")
        private String imageUrl;
        /**
         * 主卖点
         */
        @Schema(description = "主卖点")
        private String mainPoint;
        /**
         * 副卖点
         */
        @Schema(description = "副卖点")
        private String point;
    }

    @Data
    public static class ProtocolConfig implements Serializable {
        /**
         * 协议名称
         */
        @Schema(description = "协议名称")
        private String protocolName;
        /**
         * 协议链接
         */
        @Schema(description = "协议链接")
        private String protocolLink;
        /**
         * 协议内容
         */
        @Schema(description = "协议内容")
        private String protocolContent;
    }

    @Data
    public static class CustomerServiceConfig implements Serializable {
        /**
         * 联系人名称
         */
        @Schema(description = "联系人名称")
        private String name;
        /**
         * qq
         */
        @Schema(description = "qq")
        private String qq;
        /**
         * 微信号
         */
        @Schema(description = "微信号")
        private String wechatNumber;
        /**
         * 电话
         */
        @Schema(description = "电话")
        private String phone;
    }

}
